<template>
  <div class="det">
    <h1 style="color:red">{{data.type}} <span style="font-size:20px;color:#000000">详情</span></h1>
    <h2>{{data.hero}}</h2>
  </div>
</template>
<script>
import axios from 'axios'
export default {
    data(){
        return {
            data:''
        }
    },
    methods:{
        dat(){
            let i = this.$route.query.i;
            axios.get(`http://localhost:3000/list${i}`).then(res=>{
                console.log(res.data);
                this.data=res.data;
            })
        }
    },
    mounted(){
        this.dat()
    }
}
</script>
<style>
.det{
  width: 100%;
  height: 500px;
  background-color: chartreuse;
  margin-top: 50px;
}
</style>